<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class cache</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class cache</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">cookie.class.php     Zhuayi 缓存操作类</p>
	<ul class="tags">
				<li><span class="field">author:</span> zhuayi</li>
				<li><span class="field">copyright:</span> (C) 2005 - 2010  zhuayi</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_class---cache.class.php.html">/class/cache.class.php</a> (line <span class="field">10</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																						
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#cache_data" title="details" class="method-name">cache_data</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$timeout</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$object</span>, <span class="var-type">find</span>&nbsp;<span class="var-name">$cache_var</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">'data'</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#cache_path" title="details" class="method-name">cache_path</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$path</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$cache_path</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#cache_read" title="details" class="method-name">cache_read</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$object</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_cache" title="details" class="method-name">_cache</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$timeout</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$cache_path</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$cache_str</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">'data'</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_cache_read" title="details" class="method-name">_cache_read</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodcache_data" id="cache_data"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">cache_data</span> (line <span class="line-number">94</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">读取缓存，不存在则写入,一般用在缓存数据上</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			cache_data
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$timeout</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$object</span>, <span class="var-type">find</span>&nbsp;<span class="var-name">$cache_var</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">'data'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$timeout</span><span class="var-description">: 缓存过期时间</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$object</span><span class="var-description">: 缓存对象</span>			</li>
					<li>
				<span class="var-type">find</span>
				<span class="var-name">$cache_var</span><span class="var-description">: 缓存内容,可以是字符串或数组，数组将会被转为json数据存储</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$path</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcache_path" id="cache_path"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">cache_path</span> (line <span class="line-number">17</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">搜索文件</p>
<p class="description"><p>缓存文件后缀为过期时间  用来组合缓存路径</p></p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			cache_path
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$path</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$cache_path</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$path</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$cache_path</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcache_read" id="cache_read"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">cache_read</span> (line <span class="line-number">33</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">读取缓存,判断后缀时间是否过期，过期返回false</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			cache_read
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$object</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$path</span><span class="var-description">: 缓存根路径</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$object</span><span class="var-description">: 缓存对象</span>			</li>
				</ul>
		
			
	</div>
<a name="method_cache" id="_cache"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_cache</span> (line <span class="line-number">73</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">写入文件缓存</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_cache
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$timeout</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$cache_path</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$cache_str</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">'data'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$timeout</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$cache_path</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$cache_str</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$path</span>			</li>
				</ul>
		
			
	</div>
<a name="method_cache_read" id="_cache_read"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_cache_read</span> (line <span class="line-number">63</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">读取缓存</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_cache_read
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span><span class="var-description">: 缓存文件</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Mon, 11 Apr 2011 09:18:41 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>